import request from '../../../utils/request'


export function subjectPaginationListApi(page_size, current_page) {
    /**
     * 指定分页信息查询学科列表接口
    */
    return request({
      url: '/api/resources/subject/?page_size=' + page_size + '&current_page=' + current_page,
      method: 'GET',
    })
}
  
export function subjectSearchPaginationListApi(page_size, current_page, search_date) {
    /**
     * 指定分页信息查询学科列表接口
    */
    return request({
      url: '/api/resources/subject/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_date,
      method: 'GET',
    })
}
  
export function subjectSearchApi(search_data) {
    /**
     * 指定查询内容获取学科接口
    */
    return request({
      url: '/api/resources/subject/?search_data=' + search_data,
      method: 'GET',
    })
}
  
export function subjectSearchPaginationApi(page_size, current_page, search_data) {
    /**
     * 指定查询内容获取学科信息接口——包含分页信息
    */
    return request({
      url: '/api/resources/subject/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
      method: 'GET',
    })
}
  
export function subjectListApi() {
    /**
     * 学科列表接口
    */
    return request({
      url: '/api/resources/subject/',
      method: 'GET',
    })
}
  
export function subjectCreateApi(data) {
    /**
     * 学科创建接口
    */
    return request({
      url: '/api/resources/subject/',
      method: 'POST',
      data: data,
    })
}
  
  
export function subjectDeleteApi (data) {
    /**
     * 学科删除接口
    */
    return request({
      url: '/api/resources/subject/' + data['id'] + '/',
      method: 'DELETE',
    })
}
  
export function subjectUpdateApi (data) {
    /**
     * 学科更新接口
    */
    return request({
      url: '/api/resources/subject/' + data['id'] + '/',
      method: 'PATCH',
      data: data
    })
}
  
export function subjectDetailApi (data) {
    /**
     * 单个学科接口
    */
    return request({
      url: '/api/resources/subject/' + data['id'] + '/',
      method: 'GET',
    })
}